<%@ page contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib  uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib  uri="http://www.springframework.org/security/tags" prefix="sec" %>
<%@ taglib  uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib  uri="http://www.joda.org/joda/time/tags" prefix="joda" %>
<table class="table table-hover table-bordered table-striped table-condensed ">
<thead>
  <tr>
    <td>
     <div class="btn-group dropup">
     	<button class="btn btn-success" id="addBtn">
     	  <i class="icon-white icon-plus"></i>
     	新增合同</button>
       
       	<button class="btn btn-info" id="importBtn" onClick="importData()" >
           <i class="icon-chevron-right icon-white"></i>          
                                    导入合同
        </button> 
         
     </div>
    </td>
  </tr>
  <tr>
    <th>浏览</th>
    <th>合同号</th>
    <th>客户</th>
    <th>日期</th>
    <th>管理</th>
  </tr>
</thead>
<tbody>
  <c:forEach items="${pager.rows}" var="item">
   <tr>
    <td>
    <div class="btn-group">
      <button class="btn btn-info" onclick="openOne('${item.id}')">
       <i class="icon-white icon-edit"></i> 
                       查看</button>              
     </div>
    </td>
    <td>
      ${item.name}
    </td>
    <td>
     ${item.client.name}
    </td>
    <td>
      <joda:format value="${item.dueDate}" pattern="yyyy年MM月dd日" />
    </td>
    <td>
      <button class="btn btn-danger btn-mini" onclick="removeOne('${item.id}')">
       <i class="icon-remove"></i>
      </button>  
    </td>
   </tr>  
  
  </c:forEach>
</tbody>
<tfoot>
 <th colspan="5">
  ${pager.pagination}
 </th>
</tfoot>
</table>
<script type="text/javascript" src="scripts/apps/contract/list.js"></script>